package cn.tedu.shoot;

import java.awt.image.BufferedImage;

/*子弹*/
public class BossBullet extends FlyingObject {
    private int speed;
    private int xSpeed;

    BossBullet(int x, int y) {
        super(20, 20);
        Boss boss=new Boss();
        this.x=x;
        this.y=y;
        speed = 3;
    }
    BossBullet(int x, int y, int xSpeed) {
        super(8, 20);
        Boss boss=new Boss();
        this.x=x;
        this.y=y;
        speed = 3;
        this.xSpeed=xSpeed;
    }

    public void step() {
        y-=speed;
        x+=xSpeed;

    }
    public void step1() {
        y+=speed;
        x+=xSpeed;

    }

    public BufferedImage getImage(){
        if (isLive()){
            return Images.bossBullet;
        }else if (isDead()){
            stated=REMOVE;
            return null;
        }else{
            return null;
        }

    }

    public boolean isOutOfBounds(){
        return y>=World.HEIGHT;
    }
}
